<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>使用html标签属性配置上传组件</title>
    <script src="http://a.tbcdn.cn/s/kissy/1.2.0/kissy-min.js" charset="utf-8"></script>

</head>
<body>
<h2>使用html标签属性配置上传组件</h2>

<div class="grid">

    <input class="g-u" id="J_UploaderBtn" name="Filedata" type="image-uploader" value="上传图片" queueTarget="#J_UploaderQueue"
           action="upload.php" urlsInputName="imageUrls" max="3" maxSize="500">

    <!--用来存放服务器端返回的图片路径，多个图片以逗号隔开-->
    <input type="hidden" name="imageUrls" value="http://tp4.sinaimg.cn/1653905027/180/5601547226/1,http://img02.taobaocdn.com/imgextra/i2/748902859/T2OTOdXm0bXXXXXXXX_!!748902859.jpg_310x310.jpg">
</div>
<ul id="J_UploaderQueue" class="grid">

</ul>


<script>
    var S = KISSY,
    //包路径，实际使用请直接配置为"http://a.tbcdn.cn/s/kissy/"
            path = S.Config.debug && "../../../../../../" || "http://a.tbcdn.cn/s/kissy/";
    S.config({
        packages:[
            {
                name:"gallery",
                path:path,
                charset:"utf-8"
            }
        ]
    });

    KISSY.use('gallery/form/1.3/uploader/imageUploader', function (S, ImageUploader) {
            new ImageUploader('#J_UploaderBtn').render();
    })

</script>
</body>
</html>